package Server.Controller;

import Ice.Current;
import Server.Entity.Dominio.EWorker;
import Server.TechnicalServices.Foundation.FdbFacade;

public class CAutenticazioneI extends InterfacceCondivise.CAutenticazione {

	private static final long serialVersionUID = 1L;

	@Override
	public boolean autentica(String nome, String password, Current __current) {
		
		FdbFacade fdb = new FdbFacade();
		EWorker dipendente = (EWorker) fdb.getDipendenteByUsername(nome);
		if(dipendente!=null)
		return dipendente.getPassword().equals(password);
		return false;
	}


}
